/*
 * Filtro.cpp
 */

#include "../../include/vision/Filtro.h"

Filtro::Filtro(){
}

Mat Filtro::FiltroImg(Mat hsvMat,Scalar soglia_inf, Scalar soglia_sup) {

	Mat img_filt(Size(640,240),CV_8UC1,Scalar(0));
	Mat img_filt2(Size(640,240),CV_8UC1,Scalar(0));

	inRange(hsvMat,soglia_inf,soglia_sup,img_filt);
	dilate(img_filt,img_filt, Mat(), Point(-1,-1), 1, NULL,NULL );
	erode(img_filt,img_filt, Mat(), Point(-1,-1), 1, NULL,NULL );
	bilateralFilter(img_filt,img_filt2,7,150,150);
	return img_filt2;
}


Filtro::~Filtro(){}



